<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateNewsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {   //活动/文章表
        Schema::create('news', function (Blueprint $table) {
            $table->increments('new_id');
            $table->integer('cat_id')->comment('栏目id');
            $table->integer('typeid')->comment('类型id');
            $table->string('title')->comment('活动标题');
            $table->string('username')->comment('活动作者');
            $table->string('style')->comment('风格');
            $table->string('thumb')->comment('缩略图usrl');
            $table->string('keywords')->comment('关键字');
            $table->string('description')->comment('活动描述');
            $table->text('content')->comment('活动内容');
            $table->integer('posids')->comment('是否推荐');
            $table->string('url')->comment('活动usrl');
            $table->integer('listorder')->comment('排序');
            $table->integer('status')->comment('状态');
            $table->string('sysadd');
            $table->integer('islink')->comment('是否显示连接');
            $table->dateTime('inputtime')->comment('发表时间');
            $table->dateTime('updatetime')->comment('修改时间');
            //$table->timestamps();

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
       Schema::drop('news');
    }
}
